package com.gitee.mapper;

import com.gitee.entity.FansList;
import com.gitee.entity.FollowList;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface FansListMapper {
    @Insert("insert into sxq_fans_list values(null,#{userId},#{fansId},#{avatar},#{nickname})")
    void insert(FansList fansList);

    @Select("select count(*) from sxq_fans_list where user_id = #{userId}")
    Long count(Integer userId);

    @Select("select * from sxq_fans_list where user_id = #{userId}")
    List<FansList> selectByUserId(Integer userId);

    @Delete("delete from sxq_fans_list where user_id = #{userId} and fans_id = #{fansId}")
    void deleteByUserIdAndFansId(@Param("userId") Integer userId, @Param("fansId") Integer fansId);
}
